from selenium.webdriver.common.by import By

order_on = None
"""
    以下为app登录模块配置信息
"""
app_login_me = By.XPATH, "//*[@text='我的']"
app_login_link = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/head_img']"
app_login_username = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/mobile_et']"
app_login_password = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/pwd_et']"
app_pro = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/agree_btn']"
app_login_btn = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/login_tv']"
app_nickname = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/nick_name_tv']"
"""
    以下为app订单模块配置信息
"""
app_order_index = By.XPATH, "//*[@text='首页']"
app_order_search_text1 = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/default_search_et']"
app_order_search_text2 = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/search_et']"
app_order_search_btn = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/search_btn']"
app_order_click_img = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/product_pic_img']"
app_order_add_cart = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/add_cart_tv']"
app_order_cart_ok = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/confirm_tv']"
app_order_click_cart = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/bottom_cart_img']"
app_order_now_purchase = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/buy_tv']"
app_order_click_submit_order = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/submit_tv']"
app_order_click_now_pay = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/pay_btn']"
app_order_pwd = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/pwd_et']"
app_order_pwd_sure = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/sure_tv']"
app_order_order_number = By.XPATH, "//*[@resource-id='com.tpshop.malls:id/pay_trade_no_tv']"
"""
    以下为web登录模块配置信息
"""
web_login_username = By.CSS_SELECTOR, "[name='username']"
web_login_password = By.CSS_SELECTOR, "[name='password']"
web_login_vertify = By.CSS_SELECTOR, "[name='vertify']"
web_login_submit = By.CSS_SELECTOR, "[name='submit']"
web_login_nickname = By.CSS_SELECTOR, "[class='bgdopa-t']"
"""
    以下为web发货模块配置信息
"""
web_order = By.XPATH, "//a[text()='订单']"
web_order_delivery = By.XPATH, "//a[text()='发货单']"
web_order_iframe = By.CSS_SELECTOR, "#workspace"
# 默认第一个去发货
# web_order_go_delivery = By.XPATH, "//a[text()='去发货']"
# 根据订单号去发货
web_order_go_delivery = "//div[text()='{}']/../..//td[@class='handle']//a[1]"
web_order_company = By.CSS_SELECTOR, "[value='YZPY']"
web_order_order_on = By.CSS_SELECTOR, "#invoice_no"
web_order_goods_ok = By.CSS_SELECTOR, ".ncap-btn-send"
web_order_print_order = By.CSS_SELECTOR,".fa-print"
web_order_on = By.XPATH, "//div[@id='printDiv']//div[4]//dl[1]//dd[2]"
